PHP ReadFile functions
ReadFile(PHP 4, PHP 5)ReadFile-Output a fileDescribeInternational ReadFile (string $ file name [, Boolean $ use_include_path = False [, resource $ background]])Reads the file and writes it to its output
I put a download link to the Android APK installation package on the server side (Apache environment), using
readfile()After reading the apk file output download, the phone install APK shows parsing package error. But the APK itself is not a problem,
If you have an effective solution to the readfile file downloading problem, add points and paste them together. now we have encountered a problem in our project. When you use readfile to download an image file, the file will start with one more bit (
I put an Android APK installation package on the server side (Apache environment) Download link, using the readfile() read apk file output download, the phone installation apk display parsing package error. But the APK itself is not a problem, the
Readfile(PHP 4 and PHP 5)Readfile-output a fileDescriptionInternational readfile (string $ file name [, Boolean $ use_include_path = false [, resource $ background])Read the file and write it to the output buffer.ParametersFile nameThe file is
If the file upload is too large to produce errors, this article mainly introduces PHP ReadFile () modified file upload size settings, interested to know
Using PHP ziparchive generated compression package, small compressed package can be downloaded,
php readfile download Download appears 1kb
Header ("content-type:application/$kind");
Header ("content-disposition:attachment; Filename= $filename ");
ReadFile ($requireurl);
Why do I use the above code to download files are
For readfile and file_get_conents, for example, echofilegetcontents (& quot; delimiter), what is the process of readfile and file_get_conents? remote server ----- & gt; local-about readfile and file_get_conents
Example
Echo file get contents
Sometimes, to hide the truth, we define the file as a header and then download the readfile, but this will increase the burden on the server. generally, we do not recommend downloading large files.
The code is as follows:
Function sendFile ($
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.